# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.VMMigration.V1.Model.ComputeEngineDisksTargetDefaults do
  @moduledoc """
  ComputeEngineDisksTargetDefaults is a collection of details for creating Persistent Disks in a target Compute Engine project.

  ## Attributes

  *   `disks` (*type:* `list(GoogleApi.VMMigration.V1.Model.PersistentDiskDefaults.t)`, *default:* `nil`) - The details of each Persistent Disk to create.
  *   `disksTargetDefaults` (*type:* `GoogleApi.VMMigration.V1.Model.DisksMigrationDisksTargetDefaults.t`, *default:* `nil`) - Details of the disk only migration target.
  *   `targetProject` (*type:* `String.t`, *default:* `nil`) - The full path of the resource of type TargetProject which represents the Compute Engine project in which to create the Persistent Disks.
  *   `vmTargetDefaults` (*type:* `GoogleApi.VMMigration.V1.Model.DisksMigrationVmTargetDefaults.t`, *default:* `nil`) - Details of the VM migration target.
  *   `zone` (*type:* `String.t`, *default:* `nil`) - The zone in which to create the Persistent Disks.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :disks => list(GoogleApi.VMMigration.V1.Model.PersistentDiskDefaults.t()) | nil,
          :disksTargetDefaults =>
            GoogleApi.VMMigration.V1.Model.DisksMigrationDisksTargetDefaults.t() | nil,
          :targetProject => String.t() | nil,
          :vmTargetDefaults =>
            GoogleApi.VMMigration.V1.Model.DisksMigrationVmTargetDefaults.t() | nil,
          :zone => String.t() | nil
        }

  field(:disks, as: GoogleApi.VMMigration.V1.Model.PersistentDiskDefaults, type: :list)

  field(:disksTargetDefaults, as: GoogleApi.VMMigration.V1.Model.DisksMigrationDisksTargetDefaults)

  field(:targetProject)
  field(:vmTargetDefaults, as: GoogleApi.VMMigration.V1.Model.DisksMigrationVmTargetDefaults)
  field(:zone)
end

defimpl Poison.Decoder, for: GoogleApi.VMMigration.V1.Model.ComputeEngineDisksTargetDefaults do
  def decode(value, options) do
    GoogleApi.VMMigration.V1.Model.ComputeEngineDisksTargetDefaults.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.VMMigration.V1.Model.ComputeEngineDisksTargetDefaults do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
